<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="utf-8">
	<title>左岸&网盘</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link href="/layui/css/layui.css" rel="stylesheet">
</head>
<body>
	<div class="header">
		<ul class="layui-nav" lay-filter="">
			<li class="layui-nav-item"><a href="">左岸&网盘</a></li>
			<li class="layui-nav-item layui-this"><a href="">图片</a></li>
			<li class="layui-nav-item"><a href="">文档</a></li>
			<li class="layui-nav-item"><a href="javascript:;">视频</a>
				<dl class="layui-nav-child">
					<!-- 二级菜单 -->
					<dd>
						<a href="">JAVA基础</a>
					</dd>
					<dd>
						<a href="">大数据</a>
					</dd>
					<dd>
						<a href="">数据库优化</a>
					</dd>
				</dl></li>
			<li class="layui-nav-item"><a href="">社区</a></li>
		</ul>
	</div>
	<div>
		<br/>
		
		<form class="form-horizontal m-t layui-form layui-form-pane" id="form1">
			
			 <div class="layui-btn-group">
			    <button class="layui-btn layui-btn-primary">分享</button>
			    <button class="layui-btn layui-btn-primary">下载</button>
			    <button class="layui-btn layui-btn-primary">删除</button>
			    <button class="layui-btn layui-btn-primary">重命名</button>
			    <button class="layui-btn layui-btn-primary">复制到</button>
			    <button class="layui-btn layui-btn-primary">移动到</button>
			 </div>
			 
			 <button class="layui-btn" >新建文件夹</button> 
			<input type="file" name="file" lay-type="file" class="layui-upload-file"> 
        </form>         
        
        	 
			                
	
		<table class="layui-table">
		  <thead>
		    <tr>
		      <th><input type="checkbox"></th>
		      <th>文件名称</th>
		      <th>文件大小</th>
		      <th>上传时间</th>
		      <th>操作</th>
		    </tr> 
		  </thead>
		  <tbody>
		    <tr th:each="file,fileStat : ${list}">
		      <td><input type="checkbox"></td>
		      <td th:text="${file.path}" ></td> 
		      <td><span th:text="${file.length > 0 ? file.length+' B':''}"></span></td> 
		      <td th:text="${#dates.format(file.modificationTime, 'yyyy-MM-dd HH:mm:ss')}"></td> 
		      <td>
		        <button class="layui-btn layui-btn-danger">删除</button>
		        <button class="layui-btn">下载</button>
		        <button class="layui-btn layui-btn-warm" type="button" id="open">查看</button>
		      </td>
		    </tr>
		    
		  </tbody>
		</table>
	
	</div>

	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
	<script type="text/javascript" src="/layui/layui.js"></script>
	<script type="text/javascript">
		layui.use(['element','form', 'upload'], function(){  
			var form = layui.form(),element = layui.element();
			layui.upload({
			    url: '/upload/image'
			    ,success: function(res){ //上传成功后的回调
			    	if(res.code == 0 ){
			    		layer.msg(res.msg||"操作成功", {time: 2000},function(){
	   						layer.closeAll(); 
	   						location.href = "/";
	   					});
			    	}
			      
			    }
			});
			
			 $("#open").click(function(){
				
		       	layer.open({
        	      type: 2,
        	      title: '电子书',
        	      shadeClose: true,
        	      shade: false,
        	      area: ['1200px', '600px'],
        	      content: '/pdf',
        	      end: function(index){
       	    	  }
        	    });
			})
		});
		
		
	</script>
</body>
</html>